package com.dao;

import com.pojo.Table;
import com.pojo.TableExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TableMapper {
    long countByExample(TableExample example);

    int deleteByExample(TableExample example);

    int deleteByPrimaryKey(Integer tId);

    int insert(Table record);

    int insertSelective(Table record);

    List<Table> selectByExample(TableExample example);

    Table selectByPrimaryKey(Integer tId);

    int updateByExampleSelective(@Param("record") Table record, @Param("example") TableExample example);

    int updateByExample(@Param("record") Table record, @Param("example") TableExample example);

    int updateByPrimaryKeySelective(Table record);

    int updateByPrimaryKey(Table record);


    //自定义方法，用于更新餐桌状态
    public int updateTableStatusById(@Param("tableStatus") String tableStatus, @Param("tableId") Integer tableId);


    //根据餐桌状态选择餐桌
    public List<Table> selectTableWithStatus(String tableStatus);
}